package com.itheima.arraylist;


import java.util.ArrayList;

public class Demo2 {
    public static void main(String[] args) {
        ArrayList<Student> list1=new ArrayList<>();
        Student stu1=new Student("张三1",23);
        Student stu2=new Student("张三2",23);
        Student stu3=new Student("张三3",23);
        list1.add(stu1);
        list1.add(stu2);
        list1.add(stu3);
    }

}
